home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 30 / Amiga Format AFCD30 (Sep 1998, Issue 114).iso / -seriously_amiga- / sound / euterpe / developer / xappmsg.h < prev    next >
C/C++ Source or Header  |  1998-06-18  |  3KB  |  108 lines

  1. // xappmsg.h
  2. // Author : Dominique Lorre
  3. // $Id: xappmsg.h 1.2 1998/03/09 15:32:08 dlorre Exp dlorre $
  4.  
  5. #if !defined( CLASS_XAPPMSG_H )
  6. #define CLASS_XAPPMSG_H
  7.  
  8. #if !defined( EXEC_TYPES_H )
  9. #include <exec/types.h>
  10. #endif
  11.  
  12. #if !defined( EXEC_PORTS_H )
  13. #include <exec/ports.h>
  14. #endif
  15.  
  16. #if !defined( UTILITY_HOOKS_H )
  17. #include <utility/hooks.h>
  18. #endif
  19.  
  20. #if !defined( UTILITY_TAGITEM_H )
  21. #include <utility/tagitem.h>
  22. #endif
  23.  
  24. #define XAPPNAMELENGTH  40
  25. #define XAPPPORTNAME    "Euterpe.xapp"
  26.  
  27. #define XAPP_TagBase        (TAG_USER+100)
  28. #define XAPP_Name           (XAPP_TagBase+1)
  29. #define XAPP_PortName       (XAPP_TagBase+2)
  30. #define XAPP_Type           (XAPP_TagBase+3)
  31. #define XAPP_Handle         (XAPP_TagBase+4)
  32. #define XAPP_FileName       (XAPP_TagBase+5)
  33.  
  34. #define FX_TagBase          (TAG_USER+200)
  35. #define FX_Hook             (FX_TagBase+1)
  36.  
  37. #define BANK_TagBase        (TAG_USER+300)
  38. #define BANK_MidiBuffer     (BANK_TagBase+1)
  39. #define BANK_MidiLength     (BANK_TagBase+2)
  40. #define BANK_ProgramList    (BANK_TagBase+3)
  41.  
  42. enum XAppAction {
  43.     XAPPACT_ADD,            // Add the xapp
  44.     XAPPACT_INIT,           // The xapp has successfully initialized it's Port
  45.     XAPPACT_FAILURE,        // The xapp has failed somewhere in it's initialization
  46.     XAPPACT_REMOVE,         // Remove the xapp
  47.     XAPPACT_SHOW,           // Show the xapp window
  48.     XAPPACT_HIDE,           // Hide the xapp window
  49.     XAPPACT_SENDMIDI,       // Send midi to an output
  50.     XAPPACT_RECVMIDI,       // Receive midi from an input
  51.     XAPPACT_LOCKMIDI,       // Get the midi input as exclusive access
  52.     XAPPACT_UNLOCKMIDI,     // Frees the midi input
  53.     XAPPACT_LOADSOUND,      // Load a sound and map it to the specified PGMCHANGE
  54.     XAPPACT_LOADBANK,       // Load a complete sound configuration
  55.     XAPPACT_LOADCONFIG,     // Load an xapp configuration
  56.     XAPPACT_SAVECONFIG,     // Save an xapp configuration
  57.     XAPPACT_PROGRAMLIST     // Ask the bankeditor for the program names
  58. };
  59.  
  60. enum XAppType {
  61.     XAPPTYP_UNKWNOWN,          // Default value if not set by the xapp
  62.     XAPPTYP_BANKEDITOR,        // Independent application using Euterpe's IO
  63.     XAPPTYP_EFFECTSPROCESSOR   // Effect controlled by Euterpe
  64. };
  65.  
  66. enum XAppError {
  67.     XAPPERR_ACTION_NOT_KNOWN,   // The XApp do not support this command
  68.     XAPPERR_FILE_NOT_FOUND,     // The XApp could not open the file
  69.     XAPPERR_MIDI_LOCKED,        // Another XApp already locked the Midi Input
  70.     XAPPERR_OK                  // No error
  71. };
  72.  
  73. struct XAppMsg {
  74.     struct Message  xm_Message ;
  75.     enum XAppAction xm_Action ;
  76.     struct TagItem* xm_Tags ;
  77.     APTR            xm_Result ;
  78.     LONG            xm_Length ;
  79.     enum XAppError  xm_Error ;
  80. } ;
  81.  
  82. struct FXNode
  83. {
  84.     struct MinNode      x_Node ;
  85.     union {
  86.         UBYTE           x_Data[4] ;
  87.         ULONG           x_Msg ;
  88.     };
  89.     LONG    x_Pos ;     // Position in Sequencer
  90.     LONG    x_Len ;     // Length of a NoteOn
  91. };
  92.  
  93. #define FXNODEB_INUSE   0
  94. #define FXNODEB_ALLOC   1
  95.  
  96. #define FXNODEF_INUSE   (1 << FXNODEB_INUSE)
  97. #define FXNODEF_ALLOC   (1 << FXNODEB_ALLOC)
  98.  
  99. struct FXParams
  100. {
  101.     struct FXNode   *fp_Array ;
  102.     struct MinList  *fp_List ;
  103.     LONG            fp_Size ;
  104.     LONG            fp_Pos ;
  105. };
  106.  
  107. #endif
  108.